package com.zdkj.subway.stm.controller;

import com.zdkj.common.core.util.R;
import com.zdkj.common.log.annotation.SysLog;
import com.zdkj.subway.stm.dto.in.SwStInputPassengerWorkConfirmDTO;
import com.zdkj.subway.stm.dto.in.SwStInputPassengerWorkConfirmSelectDTO;
import com.zdkj.subway.stm.service.SwStInputPassengerWorkConfirmService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * @support: zdkj
 * @author: cuilei
 * @version: 1.0
 * @Date: 2020-06-10 10:07
 * @Description: <p>
 * 乘客事务确认
 * </p>
 */
@RestController
@AllArgsConstructor
@RequestMapping("/swstinputpassengerworkConfirm")
@Api(value = "swstinputpassengerworkConfirm", tags = "乘客事务确认")
public class SwStInputPassengerWorkConfirmController {

    private final SwStInputPassengerWorkConfirmService swStInputPassengerWorkConfirmService;

    /**
     * 查询未确认的乘客事务信息
     *
     * @param selectDTO
     * @return
     */
    @ApiOperation(value = "查询未确认的乘客事务信息", notes = "查询未确认的乘客事务信息")
    //@SysLog("查询未确认的乘客事务信息")
    @GetMapping("/list")
    public R getPassengerWorkList(SwStInputPassengerWorkConfirmSelectDTO selectDTO) {
        return R.ok(swStInputPassengerWorkConfirmService.selectList(selectDTO));
    }

    /**
     * 一键确认乘客事务
     *
     * @param confirmDTO
     * @return
     */
    @ApiOperation(value = "一键确认乘客事务", notes = "一键确认乘客事务")
    //@SysLog("一键确认乘客事务")
    @PostMapping("/confirm")
    public R confirmPassengerWork(@RequestBody SwStInputPassengerWorkConfirmDTO confirmDTO) {
        return R.ok(swStInputPassengerWorkConfirmService.confirm(confirmDTO));
    }
}
